﻿using WindowsPhoneMVC.Navigation;
using WindowsPhoneMVC.Navigation.Interfaces;

namespace WindowsPhoneMVC.ActionResults
{
    public class DataResult : ActionResult, IHaveNavigationCompletedSteps
    {
        private readonly object result;

        public DataResult(NavigationContext context, object result)
            : base(context)
        {
            this.result = result;
        }

        protected override void ExecuteInternal()
        {
        }

        public void NavigationComplete()
        {
            Context.Navigator.NavigationResult(result);
        }
    }
}